import $ from '../../../lib/jquery-3.1.1.min'
$(function(){
    var fn = ABUS.Fn;
    var $el = $('#businessType');

    $el.find('.order_introduce li').on('touchend',function () {
        $(this).addClass('current').siblings('li').removeClass('current');
        $el.find('.orders').eq($(this).index()).show().siblings('.orders').hide()
    });

    $(".settlement").on("touchend",function () {
        fn.page_goto({
            url:"./yonghu_banli_settlement.html"
        })
    });

    //进行中
    $(".orders:eq(0)").on("touchend","li",function () {
        if($(this).index() === 0){
            fn.page_goto({
                url:"./yonghu_banli_confirm.html"
            })
        }else{
            fn.page_goto({
                url:"./yonghu_banli_processing.html"
            })
        }
    });
    //有问题
    $(".orders:eq(1)").on("touchend","li",function () {
        fn.page_goto({
            url:"./yonghu_banli_problem.html"
        })
    });
    //已结束
    $(".orders:eq(2)").on("touchend","li",function () {
        fn.page_goto({
            url:"./yonghu_banli_over.html"
        })
    })
});
